import React, { useEffect, useRef, useState } from "react";
import { Button } from "antd-mobile";
import { isValidArr } from "@/utils";
import { NotiComp } from "@/components/common";

const pageName = "game.k.ready";
const klassName = pageName.replace(/\./g, '-');

export default function VReadyComp({children, content, header, actions, handler}) {

  useEffect(() => {
  }, [])

  return (
    <div className={`cp-${klassName}`}>
      <div className="inner">
        <div className="cp-header">
          <img src="https://yinli-qixi-run.varwey.com/2023/230318-changan-kv-game/img/k-title.png" alt="" />
        </div>

        <div className="content">
          <NotiComp
            header={
              <div className="inner">
                <div className="tag">装备</div>
                <div className="title">疾速之靴</div>
                <div className="thumb" style={{backgroundImage: `url(https://yinli-qixi-run.varwey.com/2023/230318-changan-kv-game/source/icon-boot.png)`}} />
              </div>
            }
            content={<>6.5s零百爆发力</>}
            actions={false}
          />

          <NotiComp
            header={
              <div className="inner">
                <div className="tag">装备</div>
                <div className="title">超长续航包</div>
                <div className="thumb" style={{backgroundImage: `url(https://yinli-qixi-run.varwey.com/2023/230318-changan-kv-game/source/icon-battery.png)`}} />
              </div>
            }
            inline
            content={<>1100km超长续航 </>}
            actions={false}
          />
        </div>

        <div className="footer">
          <Button className={`act-btn act-btn-diamond`} onClick={handler.start}>开始游戏</Button>
        </div>
      </div>
    </div>
  )
}

